Make maggeo consistent about TZ when reading and writing dates. (This is
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 17 Jul 2013 01:53:12 +0000 (01:53 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 17 Jul 2013 01:53:12 +0000 (01:53 +0000)
still grubby code, but it's hardly strategic...)

git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4444 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/defs.h
gpsbabel/maggeo.cc

index 17361a9f819403421b30b1bf7d5a43dbb501a4f6..bae38ef4c809b443b139e7915e3f5dde2d011391 100644 (file)
@@ -275,7 +275,6 @@ class geocache_data {
     is_available(status_unknown),
     is_memberonly(status_unknown),
     has_customcoords(status_unknown),
-    last_found(0),
     placer_id(0),
     favorite_points(0)
   {}
@@ -288,8 +287,8 @@ class geocache_data {
   status_type is_available:2;
   status_type is_memberonly:2;
   status_type has_customcoords:2;
-  gpsbabel::DateTime  exported;
-  time_t last_found;
+  gpsbabel::DateTime exported;
+  gpsbabel::DateTime last_found;
   QString placer; /* Placer name */
   int placer_id; /* Placer id */
   QString hint; /* all these UTF8, XML entities removed, May be not HTML. */
index fda2a439d3dc0214ef30e45b59dc98500348f0a5..a3b7f43daf45930ea27b6107f3bcc3bde0fbf8b4 100644 (file)
@@ -188,7 +188,7 @@ maggeo_fmtdate(time_t t)
 
   cbuf[0] = '\0';
   if (t > 0) {
-    tm = gmtime(&t);
+    tm = localtime(&t);
     if (tm) {
       date = tm->tm_mday * 100000 + (1+tm->tm_mon) * 1000 +
              tm->tm_year;